package me.keiwu.admin.util.bean;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;

/**
 * Created by kei on 27/10/2017.
 */
public class EditDataBean {

    @Getter
    @Setter
    private String text;

    @Getter
    @Setter
    private Integer x;

    @Getter
    @Setter
    private Integer y;

    @Getter
    @Setter
    private String fontFamily;

    @Getter
    @Setter
    private Integer fontSize;

    @Getter
    @Setter
    private String fontColor;

    @Getter
    @Setter
    private Double rotateDegree;

    private EditDataBean() {

    }


    public static EditDataBean createTextBean(String text, Integer x, Integer y, String fontColor, Integer fontSize) {
        return createTextBean(text, x, y, null, fontColor, fontSize, null);
    }

    public static EditDataBean createTextBean(String text, Integer x, Integer y, String fontColor, Integer fontSize,
                                              Double rotateDegree) {
        return createTextBean(text, x, y, null, fontColor, fontSize, rotateDegree);
    }

    public static EditDataBean createTextBean(String text, Integer x, Integer y, String fontFamily, String fontColor,
                                              Integer fontSize) {
        return createTextBean(text, x, y, fontFamily, fontColor, fontSize, null);
    }

    public static EditDataBean createTextBean(@NotNull String text, @NotNull Integer x, @NotNull Integer y, String fontFamily, @NotNull String fontColor,
                                              @NotNull Integer fontSize, Double rotateDegree) {
        EditDataBean bean = new EditDataBean();
        bean.text = text;
        bean.x = x;
        bean.y = y;
        bean.fontFamily = fontFamily;
        bean.fontSize = fontSize;
        bean.fontColor = fontColor;
        bean.rotateDegree = rotateDegree;
        return bean;
    }
}
